﻿using YNTK.Common.Const;
using YNTK.Common.Entity;
using SqlSugar;

namespace YNTK.System.Entitys.Role
{
    /// <summary>
    /// 角色信息基类
    /// </summary>
    [SugarTable("base_tkroles")]
    [Tenant(ClaimConst.TENANT_ID)]
    public class TkRoleEntity : CLDEntityBase
    {
        /// <summary>
        /// 所属组织id
        /// </summary>
        [SugarColumn(ColumnName = "F_OrganizeId")]
        public string OrganizeId { get; set; }

        /// <summary>
        /// 是否为组织管理员角色
        /// </summary>
        [SugarColumn(ColumnName = "F_Administrator", ColumnDataType= "bit", ColumnDescription = "是否为组织管理员角色")]
        public bool Administrator { get; set; }

        /// <summary>
        /// 组织管理员角色标识,{组织id}#{Administrator}#{角色编号}
        /// </summary>
        [SugarColumn(ColumnName = "F_Identification", ColumnDescription= "组织管理员角色标识,{组织id}#{Administrator}#{角色编号}")]
        public string Identification { get; set; }

        /// <summary>
        /// 角色类型id
        /// </summary>
        [SugarColumn(ColumnName = "F_DictionaryId", ColumnDescription = "角色类型id")]
        public string DictionaryId { get; set; }

        /// <summary>
        /// 角色分类(0.运营平台角色 1.组织)
        /// </summary>
        [SugarColumn(ColumnName = "F_Classify", ColumnDescription = "角色分类(0.运营平台角色 1.组织)")]
        public int Classify { get; set; }

        /// <summary>
        /// 角色名称
        /// </summary>
        [SugarColumn(ColumnName = "F_Name", ColumnDescription = "角色名称")]
        public string Name { get; set; }

        /// <summary>
        /// 角色编号
        /// </summary>
        [SugarColumn(ColumnName = "F_Code", ColumnDescription = "角色编号")]
        public string Code { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [SugarColumn(ColumnName = "F_Description")]
        public string Description { get; set; }

        /// <summary>
        /// 排序码
        /// </summary>
        [SugarColumn(ColumnName = "F_SortCode")]
        public long? SortCode { get; set; }
    }
}
